package com.drinks.yiniang;

import android.support.multidex.MultiDexApplication;

import com.drinks.yiniang.common.AppConfig;
import com.hansen.library.utils.AppUtils;
import com.tencent.bugly.crashreport.CrashReport;

/**
 * Created by han on 2019/6/10 0010.
 */

public class App extends MultiDexApplication {

    private static App instance;

    @Override
    public void onCreate() {
        super.onCreate();



        if (AppUtils.isMainProcess(getApplicationContext())) {
            instance = this;

            AppConfig.init(this);

            /** Bugly SDK初始化
             * 参数1：上下文对象
             * 参数2：APPID，平台注册时得到,注意替换成你的appId
             * 参数3：是否开启调试模式，调试模式下会输出'CrashReport'tag的日志
             */
            CrashReport.initCrashReport(getApplicationContext(), "6174f1b81d", false);
        }
    }

    public static App getInstance() {
        return instance;
    }
}
